<template>
  <div class="book-detail-area">
    <div class="middle">
      <bread-crumb class="bread-crumb-padding" :list="breadCrumb"></bread-crumb>
      <div class="box" style="position: relative">
        <Spin :withIcon="true" v-if="loading"></Spin>
        <h2 class="f-16 c-d2">选择收货地址</h2>
        <div
          class="box-item"
          v-for="(item, index) in addressList"
          :key="index"
          :class="[index == addressSelect ? 'active' : 'normal']"
        >
          <span class="f-16 f-w-600">马江林 15986829722</span>
          <p class="f-14" style="margin: 15px 0 25px">
            广东省深圳市宝安区西乡街道华丰国际机器人产业园
          </p>
          <span class="b-form-font-button" style="font-size: 16px">修改</span>
        </div>
        <div
          class="box-item normal flx-col-c-c"
          style="color: #585858; cursor: pointer"
        >
          <span class="add">+</span>
          <span class="f-16">新增收货地址</span>
        </div>
        <h2 class="f-16 c-d2" style="margin: 50px 0 20px">礼品清单</h2>
        <Table border :columns="tabelTitle" :data="list">
          <template slot-scope="{ row }" slot="info">
            <div class="flx-row-c-c" style="padding:30px 10px;">
              <div class="image" v-lazy:background-image=""></div>
              <span class="f-14 c-d2">asdfdsafdsafdsafdsafsdaf</span>
            </div>
          </template>
          <template slot-scope="{ row }" slot="number">
            <div class="flx-row-c-c">
              <div class="number-buttom">-</div>
              <div class="number-box">1</div>
              <div class="number-buttom">+</div>
            </div>
          </template>
          <template slot-scope="{ row }" slot="point">
            <span class="c-d2">2299积分</span>
          </template>
          <template slot-scope="{ row }" slot="total">
            <span class="c-d2">2299积分</span>
          </template>
        </Table>
        <div class="flx-col-s-e" style="line-height: 40px;margin:10px 0;">
          <span class="f-16 c-d2">当前可用积分：3729积分</span>
          <span class="f-16 c-d2">订单总计：2999积分</span>
        </div>
        <div class="bottom-area flx-row-e-c">
          <span class="c-d2 f-16">实际支付：<span class="c-o">2999积分</span></span>
          <div class="normal-button-size user-strong-button" style="margin-left:40px;">立即兑换</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      loading: false,
      breadCrumb: [
        { name: "积分商城", to: "/pointsmall" },
        { name: "积分订单", to: "/pmorder" },
      ],
      addressList: [1, 2],
      addressSelect: 0,
      tabelTitle: [
        {
          title: "序号",
          type: "index",
          width: 100,
          align: "center",
        },
        {
          title: "礼品信息",
          slot: "info",
          align: "center",
        },
        {
          title: "礼品数量",
          slot: "number",
          align: "center",
        },
        {
          title: "所需积分",
          slot: "point",
          align: "center",
        },
        {
          title: "小计",
          slot: "total",
          align: "center",
        }
      ],
      list: [{}]
    };
  },
  mounted() {},
  methods: {},
};
</script>

<style lang="scss" scoped>
.book-detail-area {
  background-color: #f7f7f7;
  padding-bottom: 20px;

  .box {
    background-color: #fff;
    border: 1px solid #eaeaea;
    padding: 30px 25px 50px;
    margin-bottom: 15px;
  }

  .box-item {
    border-width: 1px;
    border-style: solid;
    padding: 30px 34px;
    transition: color 0.3s, border-color 0.3s;
    margin-top: 25px;
    &.active {
      border-color: #ffa87f;
      color: #ff5100;
    }

    &.normal {
      border-color: #dadada;
      color: #1b1b1b;

      &:hover {
        border-color: #ffa87f;
      }
    }
  }
  .add {
    font-size: 30px;
    font-weight: 800;
    line-height: 45px;
  }
  .image {
    @include bg-setting(null, cover, center);
    @include size(80px, 80px);
    background-color: #ededed;
    border: 1px solid #ededed;
    margin-right: 10px;
    flex-shrink: 0;
  }
  .bottom-area {
    background-color: #F2F2F2;
    padding: 18px 28px;
  }
  .number-buttom {
    @include size(30px, 36px);
    line-height: 34px;
    border-width: 1px;
    border-style: solid;
    color: #1B1B1B;
    border-color: #B5B5B5;
    transition: color .3s, border-color .3s;
    border-radius: 4px;
    cursor: pointer;
    &:hover {
      color: #FF5100;
      border-color: #FF5100;
    }
  }
  .number-box {
    border-radius: 4px;
    min-width: 48px;
    padding: 0 15px;
    line-height: 34px;
    height: 36px;
    border: #FF5100 solid 1px;
    text-align: center;
    margin: 0 10px;

  }
}
</style>